import pygame
import Character

class Ammo(Character.Character):
	def __init__(self,x=0,y=0,mass=10,image=None):
		Character.Character.__init__(self,x=x,y=y,mass=mass)
		self.image=image
		self.cur_image=self.image
	def drawingInformation(self):
		import math
		if self.prev_y==self.y and self.prev_x==self.x:
			print "it's the same"
		else:
			r=(self.x-self.prev_x)/(((self.x-self.prev_x)**2+(self.y-self.prev_y)**2)**0.5)
			a=math.acos(r)*180/math.pi
			if self.y-self.prev_y<0:
				a=-a
			self.cur_image=pygame.transform.rotate(self.image,a)
		return (self.x-0.5*self.getWidth(),self.y+self.getHeight()),self.cur_image
	def canClimb(self,it):
		return True
	def getHeight(self):
		return self.cur_image.get_height()
	def getWidth(self):
		return self.cur_image.get_width()
	def getFullHeight(self):
		self.getHeight()
	def hitResult(self):
		self.cur_room.projectilesList.remove(self)
	def mFreedom(self):
		return not (bool(self.x_bound) or bool(self.x_bound))